package com.geek.water.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.geek.water.entity.Device;
import com.geek.water.entity.DeviceData;
import com.geek.water.vo.DevicePageQueryVO;
import io.swagger.annotations.ApiOperation;

import java.time.LocalDateTime;
import java.util.List;

public interface DeviceService extends IService<Device> {
    Page<Device> findPage(DevicePageQueryVO queryVO);
    boolean deleteById(Long id);

    @ApiOperation("检查设备序列号是否唯一")
    boolean isSerialNoUnique(String serialNo, Long excludeId);

    @ApiOperation("获取设备监控数据")
    List<DeviceData> getDeviceData(Long deviceId, LocalDateTime startTime, LocalDateTime endTime);

    @ApiOperation("上传设备数据")
    boolean uploadDeviceData(DeviceData deviceData);
}